package com.ht.module.job.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;



/**
 * <p>
 * 定时任务信息表，用于存储任务基本信息
 * </p>
 *
 * @author hejialun
 * @since 2025-08-11
 */

@TableName("job_info")
@Data
@Accessors(chain = true)
public class JobInfo{

	@Schema(description ="主键ID")
    @TableId
    private String id;

    @Schema(description ="任务组名")
    @NotEmpty
    private String jobGroup;

	@Schema(description ="任务名称")
    @NotEmpty
    private String jobName;

    @Schema(description ="Cron表达式")
    @NotEmpty
    private String cronExpression;

	@Schema(description ="执行任务的类全限定名（例如：com.ht.config.quartz.task.SampleTask）")
    @NotEmpty
    private String jobClass;

	@Schema(description ="任务参数(JSON格式)")
    private String jobParams;

	@Schema(description ="任务描述")
    private String description;

	@Schema(description ="任务状态（RUNNING=运行中，PAUSED=已暂停）")
    @NotEmpty
    private String status;

    @Schema(description ="逻辑删除")
    @TableLogic
    private Integer delFlag;

    @Schema(description ="创建人")
    private String createUser;

    @Schema(description ="创建时间")
    private LocalDateTime createDate;

    @Schema(description ="修改人")
    private String updateUser;

    @Schema(description ="修改时间")
    private LocalDateTime updateDate;




}
